<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			*{
				margin: 0px;
				padding: 0px;
			}
			.clearfix:after{
				clear: both;
				display: table;
				content: "";
			}
			.fl{
				float: left;
			}
			.fr{
				float: right;
			}
			body{
				padding: 20px;
				background-color: papayawhip;
			}
			.box{
				width: 724px;
				height: 120px;
				/*background-color: pink;*/
				margin: 50px auto;
			}
			.box #shuoshuo{
				width: 600px;
				height: 79px;
				margin: 0 auto;
				outline: none;
				border: 1px solid #ccc;
			}
			.box .img1{
				height:79px;
				width: 60px;
				background-color: #f3fae6;
				border-right: 1px solid #ccc;
				border-top: 1px solid #ccc;
				border-bottom: 1px solid #ccc;
			}
			.box .img1 .photo{
				display: block;
				width: 24px;
				height: 24px;
				background: url(bg-tubiao.png) no-repeat;
				background-position: -250px -182px;
				margin-top:30px;
				margin-left: 17px;
			}
			.box .img1 .photo:hover{
				width: 24px;
				height: 24px;
				background: url(bg-tubiao.png) no-repeat;
				background-position: -250px -208px;
				margin-top:30px;
				margin-left: 17px;
				cursor: pointer;
			}
			.box .img2{
				height:79px;
				width: 60px;
				background-color: #f3fae6;
				border-top: 1px solid #ccc;
				border-right: 1px solid #ccc;
				border-bottom: 1px solid #ccc;
			}
			.box .img2 .lianjie{
				display: block;
				width: 24px;
				height: 24px;
				background: url(bg-tubiao.png) no-repeat;
				background-position: -250px -234px;
				margin-top:30px;
				margin-left: 17px;
			}
			.box .img2 .lianjie:hover{
				display: block;
				width: 24px;
				height: 24px;
				background: url(bg-tubiao.png) no-repeat;
				background-position: -250px -260px;
				margin-top:30px;
				margin-left: 17px;
				cursor: pointer;
			}
			.box .down{
				width: 722px;
				height: 40px;
				border-bottom: 1px solid #ccc;
				border-left: 1px solid #ccc;
				border-right: 1px solid #ccc;
				background-color: white;
			}
			.box .down .biaoqing1{
				display: block;
				background: url(bg-tubiao.png) no-repeat;
				width: 16px;
				height: 16px;
				background-position: -198px 0;
				margin-left: 10px;
				margin-top: 10px;
			}
			.box .down .biaoqing1:hover{
				display:inline-block;
				background: url(bg-tubiao.png) no-repeat;
				width: 16px;
				height: 16px;
				background-position: -250px 0px;
				margin-left: 10px;
				margin-top: 10px;
				cursor: pointer;
			}
			.box .down .biaoqing2{
				display: inline-block;
				background: url(bg-tubiao.png) no-repeat;
				width: 16px;
				height: 16px;
				background-position: -250px -26px;
				margin-left: 10px;
				margin-top: 10px;
			}
			.box .down .biaoqing2:hover{
				display: inline-block;
				background: url(bg-tubiao.png) no-repeat;
				width: 16px;
				height: 16px;
				background-position: -250px -52px;
				margin-left: 10px;
				margin-top: 10px;
				cursor: pointer;
			}
			.box .down .biaoqing3{
				display: inline-block;
				background: url(bg-tubiao.png) no-repeat;
				width: 16px;
				height: 16px;
				background-position: -250px -78px;
				margin-left: 10px;
				margin-top: 10px;
			}
			.box .down .biaoqing3:hover{
				display: inline-block;
				background: url(bg-tubiao.png) no-repeat;
				width: 16px;
				height: 16px;
				background-position: -250px -104px;
				margin-left: 10px;
				margin-top: 10px;
				cursor: pointer;
			}
			.box .down .button{
				width: 80px;
				height: 30px;
				background-color: #aacc66;
				margin-right: 5px;
				margin-top: 5px;
				border-radius: 5px;
				text-align: center;
			}
			.box .down .button a{
				font-size: 16px;
				color: white;
				text-decoration: none;
				line-height: 30px;
			}
			.ss{
				width: 724px;
				border: 1px solid #CCCCCC;
				margin: 0 auto;
				display: none;
				margin-top: 20px;
			}
			.ss img{
				width: 70px;
				height: 70px;
				margin-top: 5px;
				border-radius: 50%;
			}
			.ss .txt{
				width: 620px;
				margin-top: 20px;
				margin-left: 20px;
			}
			.ss .txt .txt1 .name{
				font-size: 12px;
			}
			.ss .txt .txt1 .content{
				margin-left: 20px;
				width: 500px;
			}
			.ss .txt2{
				margin-top: 20px;
				font-size: 14px;
			}
			.ss .txt2 .zan{
				margin-right: 20px;
			}
			.ss .txt2 .del{
				cursor: pointer;
			}
		</style>
	</head>
	<body>
		<div class="box clearfix">
			<textarea id="shuoshuo" class="fl" placeholder="说点儿什么吧" style="resize: none;"></textarea>
			<div class="img1 fl">
				<span class="photo">
				</span>
			</div>
			<div class="img2 fl">
				<span class="lianjie">
				</span>
			</div>
			<div class="down fr">
				<span class="biaoqing1 fl"></span>
				<span class="biaoqing2 fl"></span>
				<span class="biaoqing3 fl"></span>
				<div class="button fr"><a href="#" id="fabiao">发表</a></div>
			</div>
		</div>
		<div class="ss clearfix" id="ss1">
			<div class="fl pic">
				<img src="6.jpg" />
			</div>
			<div class="txt fl">
				<div class="txt1 clearfix">
					<span class="name fl">小白O(∩_∩)O~~</span>
					<div class="content fl"></div>
				</div>
				<div class="txt2 clearfix">
					<span class="time fl">2018/1/9</span>
					<div class="fr">
						<span class="zan">赞</span>
						<span class="del">删除</span>
					</div>
				</div>
			</div>
		</div>
		<script>
		var oldss;
			fabiao.onclick = function(){
				var s = document.getElementsByClassName("content");
				s[0].innerHTML = shuoshuo.value;
//				ss1.getElementsByClassName("content")[0].innerHTML == shuoshuo.value;
				var ss = ss1.cloneNode(true);
				ss.getElementsByClassName("del")[0].onclick = function(){
					var deleteNode = this.parentNode.parentNode.parentNode.parentNode;
					setTimeout(function(){
						deleteNode.style.opacity = 0;
						deleteNode.style.height = "0px";
						setTimeout(function(){
							deleteNode.parentNode.removeChild(deleteNode);
						},200);
					},100);
				};
				ss.id = "";
				ss.style.display = "block";
				setTimeout(function(){
					ss.style.opacity = 1;
				},100);
				shuoshuo.value = "";
				if(document.getElementsByClassName("ss").length > 1){
					document.body.insertBefore(ss,oldss);
				}else{
					document.body.appendChild(ss);
				}
				oldss = ss;
			};
		</script>
	</body>
</html>
